package connector;

import java.util.LinkedList;
import java.util.Queue;


public class MsgConnectorPool {
	private static MsgConnectorPool connPool;
	private Queue<String> connQueue = new LinkedList<String>();
	private MsgConnectorPool(){}

	public static MsgConnectorPool getInstants(){
		if(null == connPool){
			connPool = new MsgConnectorPool();
		}
		return connPool;
	}
	
	public synchronized String getHccConnector(){
		//System.out.println("get connector...");
		return connQueue.poll();
	}
	
	public synchronized boolean addHccConnector(String msgstring){
		return connQueue.add(msgstring);
	}
}
